package view;

import server.FirewallSession;
import server.FirewallException;
import server.RulesTableType;

public class RulesStandartTable extends AbstractRulesTable
{	
	/**
	 * 
	 */
	private static final long serialVersionUID = -3151558044750502574L;

	/* Column names */
	private final static String columnNames[] = 
		{"Id", "IP", "Port", "Protocol", "Action" };
	
	/* Current advanced rules tables */
	public static RulesStandartTable currentInRulesStandartTable = null;
	public static RulesStandartTable currentOutRulesStandartTable = null;
	
	public RulesStandartTable(RulesTableType type, FirewallSession UI)
	{
		super(type, Settings.DEFAULT_RULES_WINDOW_DEPTH, columnNames.length, UI);
		
		switch(type)
		{
		case IN:
			currentInRulesStandartTable = this;
			break;
		case OUT:
			currentOutRulesStandartTable = this;
			break;
		}
		
		build();
	}

	/**
	 * Returns the table columns names
	 * @return - the table columns names
	 */
	protected String[] getColumnsNames() 
	{
		return columnNames;
	}

	/**
	 * @return - the user mode
	 */
	public String getUserMode()
	{
		return UserMode.standartUser;
	}
}
